import { lazy } from 'react';
import { createBrowserRouter, RouterProvider, Navigate } from 'react-router-dom';

const Enum = lazy(() => import('@src/page/Enum'));

const routes = [
	{
		path: '/',
		element: <Navigate to="/enum" />,
	},
	{
		path: '/enum',
		element: <Enum />,
	},
];

const router = createBrowserRouter(routes);
const Routes = () => <RouterProvider router={router} />;

export default Routes;
